/**
 * Created by chenting on 2015/10/17 订单.
 */
var debug = require('debug')('xfys-wechat:Dispatch');
var knex = require('./knex');

var Dispatch = function () {


    /**
     * 查询支持的快递列表
     */
    if (typeof this.list != 'function') {
        Dispatch.prototype.list = function (callback) {
            knex.select('*').from('dispatch').then(function(data){
                    callback(data);
                }).catch(function(err){
                    callback(err);
                });
        }
    }

}

module.exports.Dispatch  = Dispatch;